/*
 * ImageDialog.java
 *
 * Created on August 19, 2007, 3:54 PM
 */

package org.oslo.ui;

import java.awt.Frame;
import javax.swing.Icon;

/**
 *
 * @author  nl24167
 */
public class ImageDialog extends javax.swing.JDialog {
    
    /** Creates new form ImageDialog */
    public ImageDialog(Frame parent,Icon icon, boolean modal) {
        super(parent, modal);
        
        initComponents();
        int ySize = icon.getIconHeight();
        int xSize = icon.getIconWidth();
        this.setSize(xSize, ySize);
        jLabel1.setSize(xSize, ySize);
        jLabel1.setIcon(icon);
    }
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);

        jLabel1.setText("jLabel1");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addContainerGap(355, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addContainerGap(283, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
    
}
